package hy.mvpbeam.holder;

import android.net.Uri;
import android.support.annotation.LayoutRes;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;

import hy.mvpbeam.R;
import hy.mvpbeam.model.bean.PictureBean;
import hy.mvpbeam.utils.ApiService;

/**
 * Created by hy on 2016/10/26.
 */

public class PictureItemHolder extends BaseViewHolder<PictureBean.TngouBean> {


    private android.widget.ImageView imageView;

    public PictureItemHolder(ViewGroup parent) {
        super(parent, R.layout.picture_show_item);
     //   this.imageView = (ImageView) itemView.findViewById(R.id.imageView);
        this.imageView=$(R.id.imageView);
    }


    @Override
    public void setData(PictureBean.TngouBean data) {
        super.setData(data);

//        imageView.setImageURI(Uri.parse(data.getImg()));

        Glide.with(imageView.getContext()).load(ApiService.PICTURE_ROOT_LOADURL+data.getImg()).into(imageView);
    }
}
